package com.hj.utils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.UUID;

/**
 * 和订单有关的工具类
 *
 * @author haoshen
 * @version 1.0
 */
public class OrderUtil {
    public static String orderNumber() {
        int hashCode = UUID.randomUUID().toString().hashCode();
        if (hashCode < 0) {
            hashCode = -hashCode;
        }
        SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
        return format.format(new Date()) + String.format("%015d", hashCode);
    }

}
